import { useAppStore } from "@/stores/app";
import { Router } from "vue-router";

export default function createMiscsGuard(router: Router) {
  router.beforeEach((to) => {
    const appStore = useAppStore();
    appStore.setFooterHeight(to.meta.hideFooter);
    // iframe won't need a padding, I think.
    appStore.setContentPadding(to.meta.iframeUrl ? "0px" : undefined);
  });
}
